home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 120 / maccd 120.iso / Utilities / Mac OS X / FolderControl1.40.dmg / FolderControl 1.40 .app / Contents / Resources / Java / FolderControl.jar / DefaultIconViewTextSize.class (.txt) < prev    next >
Encoding:
Java Class File  |  2003-12-22  |  2.0 KB  |  64 lines

  1. import com.apple.cocoa.foundation.NSData;
  2. import com.apple.cocoa.foundation.NSDictionary;
  3. import com.apple.cocoa.foundation.NSPropertyListSerialization;
  4. import java.io.File;
  5.  
  6. public class DefaultIconViewTextSize {
  7.    // $FF: synthetic field
  8.    static Class class$com$apple$cocoa$foundation$NSDictionary;
  9.    // $FF: synthetic field
  10.    static Class class$java$lang$Number;
  11.  
  12.    public static int getDefaultIconViewTextSize() {
  13.       try {
  14.          String var0 = System.getProperty("user.name");
  15.          File var1 = new File("/Users/" + var0 + "/Library/Preferences/com.apple.finder.plist");
  16.          NSData var2 = new NSData(var1);
  17.          NSDictionary var3 = (NSDictionary)NSPropertyListSerialization.propertyListFromXMLData(var2);
  18.          Object var4 = var3.objectForKey("StandardViewOptions");
  19.          NSDictionary var5 = null;
  20.          if (var4 == null) {
  21.             var5 = null;
  22.          } else if (var4.getClass() == (class$com$apple$cocoa$foundation$NSDictionary == null ? (class$com$apple$cocoa$foundation$NSDictionary = class$("com.apple.cocoa.foundation.NSDictionary")) : class$com$apple$cocoa$foundation$NSDictionary)) {
  23.             var5 = (NSDictionary)var4;
  24.          }
  25.  
  26.          var4 = var5.objectForKey("icnv");
  27.          if (var4 == null) {
  28.             Object var12 = null;
  29.          } else if (var4.getClass() == (class$com$apple$cocoa$foundation$NSDictionary == null ? (class$com$apple$cocoa$foundation$NSDictionary = class$("com.apple.cocoa.foundation.NSDictionary")) : class$com$apple$cocoa$foundation$NSDictionary)) {
  30.             var5 = (NSDictionary)var4;
  31.          } else {
  32.             Object var14 = null;
  33.          }
  34.  
  35.          Object var6 = var3.objectForKey("FontSize");
  36.          Object var7 = null;
  37.          if (var6 == null) {
  38.             var7 = null;
  39.          } else if (var6.getClass() == (class$java$lang$Number == null ? (class$java$lang$Number = class$("java.lang.Number")) : class$java$lang$Number)) {
  40.             var7 = (Number)var6;
  41.          } else {
  42.             try {
  43.                var7 = new Integer(var6.toString());
  44.             } catch (NumberFormatException var9) {
  45.                var7 = null;
  46.             }
  47.          }
  48.  
  49.          return ((Number)var7).intValue();
  50.       } catch (Exception var10) {
  51.          return 12;
  52.       }
  53.    }
  54.  
  55.    // $FF: synthetic method
  56.    static Class class$(String var0) {
  57.       try {
  58.          return Class.forName(var0);
  59.       } catch (ClassNotFoundException var2) {
  60.          throw new NoClassDefFoundError(var2.getMessage());
  61.       }
  62.    }
  63. }
  64.